Skip to main content

All Questions

3votes
3answers
384views

How to handle checked exceptions on interface contract in Java

I am starting a project in Java and ran into the following situation. The application requires a persistence layer for a certain document type. This could be a MySql database, an AWS Dynamo DB ...
Matias Grioni's user avatar
11votes
2answers
4kviews

What should I do with implementation-specific exceptions?

Let's say I have an interface describing a simple service public interface AccountService { public int getUserId(String userName) throws UserNotFoundException; //... } I've written the ...
Winter's user avatar
4votes
4answers
3kviews

Design strategy for wrapping exceptions

I'm implementing a type of Repository for a framework/library that has (roughly) the following: public interface FooRepository { boolean contains(String id); Foo fetch(String id); void ...
Zymus's user avatar
  • 2,533

close